package com.xjtu.chapter05.ex5_5;

/**
 * @author yjq
 * @version 1.0
 * @date 2021/8/17 11:03
 */
public class InnerClassTest {
    class Pencil{//内部类
        private  int i = 10;
        public int getValue(){
            return i;
        }
    }
    class Paper{//内部类
        private String line;
        Paper(String line){
            this.line = line;
        }
        public String getLine(){
            return line;
        }
    }
    public  void writing(String story){
        Pencil pencil = new Pencil();
        Paper paper = new Paper(story);
        System.out.println(paper.getLine());
    }

    public static void main(String[] args) {
        InnerClassTest test = new InnerClassTest();
        test.writing("I am hero");
    }
}
